glyph cache: Reinstate 1 pixel padding
authorMatthias Clasen <mclasen@redhat.com>
Sun, 2 Jun 2019 16:02:31 +0000 (16:02 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 4 Jun 2019 23:00:01 +0000 (23:00 +0000)
This is necessary to prevent bleeding.

gsk/gl/gskglglyphcache.c

index b360dccca7549b78b63112469fe01721bb02654d..0f39df607bba0b9e9178e6e39bee0e0a76374e24 100644 (file)
@@ -168,8 +168,8 @@ add_to_cache (GskGLGlyphCache  *cache,
       g_assert (was_packed);
     }
 
-  value->tx = (float)packed_x / atlas->width;
-  value->ty = (float)packed_y / atlas->height;
+  value->tx = (float)(packed_x + 1) / atlas->width;
+  value->ty = (float)(packed_y + 1) / atlas->height;
   value->tw = (float)width    / atlas->width;
   value->th = (float)height   / atlas->height;
   value->used = TRUE;